package com.heima.article.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.heima.model.article.pojos.ApArticle;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * ApArticle
 *
 * @author liudo
 * @version 1.0
 * @project heima-leadnews
 * @date 2023/10/30 10:42:06
 */
@Mapper
public interface ApArticleMapper extends BaseMapper<ApArticle> {
    Page<ApArticle> selectPageLimit(Page<ApArticle> pageQuery,@Param("apArticle") ApArticle apArticle);

    /**
     * 加载更多
     *
     * @param pageQuery
     * @param apArticle
     * @return {@link Page}<{@link ApArticle}>
     */
    Page<ApArticle> selectPageBeforePublishLimit(Page<ApArticle> pageQuery,@Param("apArticle") ApArticle apArticle);

    Page<ApArticle> selectPageAfterPublishLimit(Page<ApArticle> pageQuery,@Param("apArticle") ApArticle apArticle);
}
